import Http from "../http";

export async function getRolesApi() {
    return await Http.get<any[]>('system/roles')
}

export async function getSelectedRolesApi() {
    return await Http.get<any[]>('system/selectedRoles')
}

export async function addRoleApi(data:any) {
    return await Http.post('system/role/add', data)
}

export async function editRoleApi(id:number, data:any) {
    return await Http.put('system/role/edit/' + id, data)
}

export async function deleteRoleApi(ids:number[]) {
    return await Http.delete('system/role/delete', {ids})
}